




//
//  YDEmptyView.m
//  YaDiuDiu
//
//  Created by YaoYang on 2017/10/28.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "YDEmptyView.h"
#import "UIColor+Extension.h"
@interface YDEmptyView ()
@property (nonatomic,strong) UIImageView    *imageV;
@property (nonatomic,strong) UILabel        *labelTitle;

@end

@implementation YDEmptyView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        
        _imageV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 90, 82)];
        _imageV.image = [UIImage imageNamed:@"available"];
        _imageV.center = CGPointMake(self.center.x, self.center.y-140);
        [self addSubview:_imageV];
        
        
        _labelTitle = [[UILabel alloc]initWithFrame:CGRectMake(0, _imageV.frame.origin.y+90, ScreenWidth, 30)];
        _labelTitle.textAlignment = NSTextAlignmentCenter;
        _labelTitle.font = [UIFont systemFontOfSize:15];
        _labelTitle.text = @"暂无数据...";
        _labelTitle.textColor = COLOR_RGB(186, 186, 186, 1.0);
        [self addSubview:_labelTitle];
    }
    return self;
}

- (void)emptyShow{
    self.hidden = NO;
}

- (void)emptyHidden{
    self.hidden = YES;
}

@end
